package com.boe.config;

import org.junit.jupiter.api.Test;


public class MyBatisPlusGeneratorMapperService extends MyBatisPlusBaseTest {




    /**
     * 使用 MyBatisPlus 生成 Mapper,Service
     */
    @Test
    public void mybatisGenerateService() {
        var javaPath = "/modules/" + moduleName + "/" + moduleName + "-api/src/main/java";

        generatorService(javaPath)
                .strategyConfig(builder -> {
                    builder
//                            .likeTable(new LikeTable("s_", SqlLike.LEFT))
                            .addTablePrefix("s_")
                            .addInclude(
                                    "s_annex", "s_login_user", "s_city", "s_user")
                    ;
                })
                .execute();


        generatorService(javaPath)
                .strategyConfig(builder -> {
                    builder
//                            .likeTable(new LikeTable("s_", SqlLike.LEFT))
                            .addTablePrefix("dev_")
                            .addInclude(
                                    "dev_scaffold", "dev_scaffold_modules")
                    ;
                })
                .execute();

    }




}
